﻿//-----------------------------------------------------------------------
// <copyright file="ICategory.cs" company="Craig Longford (deltawolf7@gmail.com)">
//     Copyright (c) Craig Longford. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Delta.Mercury.Business.Commerce
{
    using System;
    using Delta.Data.DataExpress;

    /// <summary>
    /// Category interface
    /// </summary>
    public interface ICategory : IDataServicable
    {
        #region Properties
        /// <summary>
        /// Gets Unique identifier
        /// </summary>
        Guid Guid { get; }

        /// <summary>
        /// Gets or sets category name
        /// </summary>
        string Name { get; set; }

        /// <summary>
        /// Gets or sets a parent guid
        /// </summary>
        Guid ParentGuid { get; set; }  
  
        /// <summary>
        /// Gets or sets the sort order
        /// </summary>
        int SortOrder { get; set; }
        #endregion

        #region Methods
        /// <summary>
        /// Deletes category
        /// </summary>
        void Delete();

        /// <summary>
        /// Get child categories
        /// </summary>
        /// <param name="showDeleted">Show deleted</param>
        /// <returns>Collection of categories</returns>
        Categories GetChildren(bool showDeleted);

        /// <summary>
        /// Get parent category
        /// </summary>
        /// <param name="showDeleted">Show deleted</param>
        /// <returns>Parent category</returns>
        Category GetParent(bool showDeleted);

        /// <summary>
        /// Get products from category
        /// </summary>
        /// <param name="showDeleted">Show deleted</param>
        /// <returns>Collection of products</returns>
        Products GetProducts(bool showDeleted);

        /// <summary>
        /// Save category
        /// </summary>
        void Save();

        /// <summary>
        /// Remove product link
        /// </summary>
        /// <param name="product">Product to detech</param>
        void RemoveProductLink(IProduct product);

        /// <summary>
        /// Add product link
        /// </summary>
        /// <param name="product">Product to attach</param>
        void AddProductLink(IProduct product);

        /// <summary>
        /// Get category images
        /// </summary>
        /// <param name="showDeleted">Show deleted</param>
        /// <returns>Collection of images</returns>
        Images GetImages(bool showDeleted);
        #endregion
    }
}
